package com.cls.business.entity;

import com.cls.common.handler.StringListTypeHandler;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cls.common.entity.BaseEntity;
import java.io.Serializable;
import java.util.List;

/**
 *  Entity
 *
 * @author slx
 * @date 2020-12-10 17:17:35
 */
@Data
@TableName("biz_entrust_topic")
public class EntrustTopic extends BaseEntity implements ITopic, Serializable {



    /**
     * 
     */
    @TableId(value = "topic_id", type = IdType.AUTO)
    private Long topicId;



    /**
     * 
     */
    @TableField("topic_code")
    private String topicCode;


    /**
     * 
     */
    @TableField("year")
    private String year;


    /**
     * 
     */
    @TableField("topic_name")
    private String topicName;


    /**
     * 
     */
    @TableField("stage")
    private String stage;


    /**
     * 
     */
    @TableField("status_type_code")
    private String statusTypeCode;


    @TableField("topic_classify_code")
    private String topicClassifyCode;

    /**
     * 
     */
    /**
     * 学科分类id
     */
    @TableField(value = "subject_type_codes",typeHandler = StringListTypeHandler.class)
    private List<String> subjectTypeCodes;


    /**
     * 
     */
    @TableField("expert_names")
    private String expertNames;

    /**
     *
     */
    @TableField("plan_id")
    private Long planId;

    @TableField(exist = false)
    private Long planNo;

    /**
     *
     */
    @TableField("entrust_topic_id")
    private Long entrustTopicId;

    @TableField(exist = false)
    List<TopicSubject> topicSubjects;

    @TableField(exist = false)
    private String planStatusCode;

    public EntrustTopic(){

    }

    public EntrustTopic(Topic topic){
        this.year = topic.getYear();
        this.topicCode = topic.getTopicCode();
        this.topicName = topic.getTopicName();
        this.entrustTopicId = topic.getTopicId();
        this.topicClassifyCode = topic.getTopicClassifyCode();
    }
}
